<!DOCTYPE html>
<html>
	<head th:replace="/mobile/common::head(~{::custom_settings})">
		<th:block th:fragment="custom_settings">
			<title>顺山科技智慧生活服务平台</title>
			<link type="text/css" rel="stylesheet" th:href="@{{css}/mobile/member/order/confirm.css(css=${css})}"/>
			<script th:inline="javascript">
				var __api = [[${order.paymentapi}]], __order = [[${#strings.toString(order.orderid)}]], __ordertotal = [[${order.ordertotal}]], 
					__diamondpay = [[${order.diamondpay}]], __needconfirm = [[${order.needconfirm}]];
			</script>
		</th:block>
	</head>
	
	<body>
		<div class="weui-tab"><div class="weui-tab__bd">
		    <div class="weui-tab-title-pay"><h1>付款</h1></div>
		    <div class="weui-tab-bd-pay">
		    	<div class="weui-tab-bd-pay-title"><img th:src="@{{image}/mobile/member/pay-pic.png(image=${image})}"/><span>顺山科技智慧生活服务平台</span></div>
			    <div class="weui-tab-bd-pays">
			    	<div class="weui-tab-bd-pays-amount"><h4>订单总金额</h4><span>￥<b th:text="${#numbers.formatDecimal(order.ordertotal, 1, 2)}"></b></span></div>
			    	<div class="weui-tab-bd-pays-preferential">
			    		<!--
			    		<div class="weui-pref"><i class="fa fa-check-circle-o"></i><h4>会员积分优惠</h4><span>￥0.20</span></div>
			    		-->
			    		<div th:if="${order.needconfirm && order.diamondpay > 0}" class="weui-pref" onclick="diamondClick(this);">
			    			<i class="fa fa-circle-thin"></i>
			    			<h4 th:text="'钻石（共 '+${order.diamondnum}+'个）'"></h4>
			    			<span th:text="'可抵扣￥'+${#numbers.formatDecimal(order.diamondpay, 1, 2)}"></span>
			    		</div>
			    		<div th:if="${!order.needconfirm || order.diamondpay <= 0}" class="weui-pref disabled">
			    			<i th:if="${order.diamondpay > 0}" class="fa fa-check-circle-o disabled"></i>
			    			<i th:if="${order.diamondpay <= 0}" class="fa fa-circle-thin disabled"></i>
			    			<h4 th:text="'钻石（共 '+${order.diamondnum}+'个）'"></h4>
			    			<span th:if="${order.needconfirm}" th:text="'可抵扣￥'+${#numbers.formatDecimal(order.diamondpay, 1, 2)}"></span>
			    			<span th:if="${!order.needconfirm}" th:text="'已抵扣￥'+${#numbers.formatDecimal(order.diamondpay, 1, 2)}"></span>
			    		</div>
		    		</div>
			    	<div class="weui-tab-bd-pays-meet"><h4>应付金额</h4><span>￥<b id="paymenttotal" th:text="${#numbers.formatDecimal(order.paymenttotal, 1, 2)}"></b></span></div>
			    </div>
			    <div class="weui-tab-pay-btn">
			    	<a class="weui-btn weui-btn_disabled weui-btn_warn" href="javascript:void(0);" onclick="confirmClick();">确认支付</a>
			    </div>
		    </div>
		</div></div>
		
		<script type="text/javascript" th:src="@{{js}/mobile/member/order/confirm.js(js=${js})}"></script>
	</body>
</html>
